﻿using System.Web.Http;

namespace JWTDemo.Controllers
{
    [JWTAuth]
    [RoutePrefix("my")]
    public class MyController : ApiController
    {
        /// <summary>
        /// 在Headers里面加入access_token，值为登录时获得的Token。从Token中可以得到一个JWTPayload的实体类，从而验证身份
        /// </summary>
        /// <returns></returns>
        [HttpGet, HttpPost, HttpDelete, Route("")]
        public string Index()
        {
            return "我的私人数据";
        }
    }
}